package com.example.hongyu.avtt.model;



import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Objects;

public class Role implements Serializable {

        private static final long serialVersionUID = -129631274788570174L;
        private String id;

        /**
         * 角色名称
         */
        private String name;

        private Date createTime;

        /**
         * 描述
         */
        private String desc;

        private int order;


        private boolean delete;

        private boolean superFlg;

        private List<Permission> permissions;

        public String getId() {
        return id;
    }

        public void setId(String id) {
        this.id = id;
    }

        public String getName() {
        return name;
    }

        public void setName(String name) {
        this.name = name;
    }

        public Date getCreateTime() {
        return createTime;
    }

        public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

        public String getDesc() {
        return desc;
    }

        public void setDesc(String desc) {
        this.desc = desc;
    }

        public List<Permission> getPermissions() {
        return permissions;
    }

        public void setPermissions(List<Permission> permissions) {
        this.permissions = permissions;
    }

        public boolean isDelete() {
        return delete;
    }

        public void setDelete(boolean delete) {
        this.delete = delete;
    }

        public int getOrder() {
        return order;
    }

        public void setOrder(int order) {
        this.order = order;
    }

        public boolean isSuperFlg() {
        return superFlg;
    }

        public void setSuperFlg(boolean superFlg) {
        this.superFlg = superFlg;
    }

        @Override
        public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Role role = (Role) o;
        return Objects.equals(id, role.id) &&
                Objects.equals(name, role.name) &&
                Objects.equals(createTime, role.createTime) &&
                Objects.equals(desc, role.desc);
    }

        @Override
        public int hashCode() {

        return Objects.hash(id, name, createTime, desc);
    }
}
